package com.hz;

import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import com.hz.entity.StNoticeTypeInfo;
import com.hz.mapper.StNoticeMapper;
import com.hz.mapper.StNoticeTypeInfoMapper;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

/**
 *@author shen chen
 *@Date 2023-11-23
 *@Description
 */
@RestController
@RequestMapping("demo")
public class DemoController {
    @Resource
    private StNoticeTypeInfoMapper stNoticeTypeInfoMapper;
    @Resource
    private StNoticeMapper stNoticeMapper;

    @GetMapping("getNoticeTypeInfoAll")
    public Object getNoticeTypeInfoAll() {
        LambdaQueryWrapper<StNoticeTypeInfo> objectLambdaQueryWrapper = Wrappers.lambdaQuery();
        return stNoticeTypeInfoMapper.selectList(objectLambdaQueryWrapper);
    }

    @GetMapping("getNoticeAll")
    public Object getNoticeAll() {
        return stNoticeMapper.selectListNew();
    }
}
